package threadstart;

/**
 * Created by 5406160@qq.com on LiBoWen 李博闻.
 *
 * @ClassName : ThreadDemo1
 * @Author : 54061
 * @Date: 2022/2/15 11:19
 */
public class ThreadDemo1 {
    public static void main(String[] args) {

        //创建Runnable的实现类对象
        //创建线程对象
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                //线程任务
                for (int i= 0; i < 100; i++){
                    System.out.println("Hello"+i);
                }

            }
        });
        //启动线程
        thread.start();
        //主线程
        for (int i = 0; i < 100; i++){
            System.out.println("PHP" +i);
        }
    }
}
